//
//  VCHConversationViewController.m
//  RongCloud
//
//  Created by chenhui on 2017/5/12.
//  Copyright © 2017年 vhuichen. All rights reserved.
//

#import "VCHConversationViewController.h"

@interface VCHConversationViewController ()

@end

@implementation VCHConversationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    self.extensionView.height =200;
    self.preferredContentSize = CGSizeMake(CLScreenW, 200);;
    self.extensionView.backgroundColor = [UIColor redColor];
    [self.conversationMessageCollectionView setFrame:CGRectMake(0, 0, self.view.bounds.size.width, 200)];
      self.chatSessionInputBarControl.y = 170;
    self.chatSessionInputBarControl.originalPositionY = 170;
    self.chatSessionInputBarControl.currentPositionY = 170;
//    UICollectionViewLayout *layout = [UICollectionViewLayout new];
//    layout.collectionViewContentSize = CGSizeMake(CLScreenW, 200);
//    [[self.conversationMessageCollectionView setCollectionViewLayout:layout ];
    // Do any additional setup after loading the view.
    
}
//重置控制器的大小
-(CGSize)preferredContentSize{
    return CGSizeMake(CLScreenW, 200);
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    //只需要语音功能
    self.defaultInputType = RCChatSessionInputBarInputVoice;
  
//    for (UIView *obj in self.chatSessionInputBarControl.subviews) {
//        CGFloat W = 0;
//        for (id obj1 in obj.subviews) {
//            if ([obj1 isKindOfClass:[UIButton class]]) {
//                UIButton *btn = obj1;
//                if (btn.frame.size.width == btn.frame.size.height) {
//                    btn.hidden = YES;
//                    W = btn.frame.size.width;
//                } else {
//                    btn.transform = CGAffineTransformMakeTranslation(W/2, 0);
//                }
//            }
//        }
//    }
}

- (void)viewWillLayoutSubviews {

    [super viewWillLayoutSubviews];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
